home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Complementary Applications 2004 February / SGI IRIX 6.5 Complementary Applications 2004 February.iso / dist / cde.idb / usr / dt / share / include / Dt / Dts.h.z / Dts.h
Encoding:
C/C++ Source or Header  |  2003-11-18  |  4.7 KB  |  180 lines

  1. /*
  2.  * Dts.h
  3.  *
  4.  * Copyright 2000, Silicon Graphics, Inc.
  5.  * ALL RIGHTS RESERVED
  6.  * 
  7.  * UNPUBLISHED -- Rights reserved under the copyright laws of the United
  8.  * States.   Use of a copyright notice is precautionary only and does not
  9.  * imply publication or disclosure.
  10.  *
  11.  * U.S. GOVERNMENT RESTRICTED RIGHTS LEGEND:
  12.  * Use, duplication or disclosure by the Government is subject to restrictions
  13.  * as set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights
  14.  * in Technical Data and Computer Software clause at DFARS 252.227-7013 and/or
  15.  * in similar or successor clauses in the FAR, or the DOD or NASA FAR
  16.  * Supplement.  Contractor/manufacturer is Silicon Graphics, Inc.,
  17.  * 2011 N. Shoreline Blvd. Mountain View, CA 94039-7311.
  18.  *
  19.  * THE CONTENT OF THIS WORK CONTAINS CONFIDENTIAL AND PROPRIETARY
  20.  * INFORMATION OF SILICON GRAPHICS, INC. ANY DUPLICATION, MODIFICATION,
  21.  * DISTRIBUTION, OR DISCLOSURE IN ANY FORM, IN WHOLE, OR IN PART, IS STRICTLY
  22.  * PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN PERMISSION OF SILICON
  23.  * GRAPHICS, INC.
  24.  */
  25. /* $XConsortium: Dts.h /main/cde1_maint/1 1995/07/17 18:05:30 drk $ */
  26. /*
  27.  *  (c) Copyright 1993, 1994 Hewlett-Packard Company
  28.  *  (c) Copyright 1993, 1994 International Business Machines Corp.
  29.  *  (c) Copyright 1993, 1994 Sun Microsystems, Inc.
  30.  *  (c) Copyright 1993, 1994 Novell, Inc.
  31.  */
  32.  
  33. #ifndef _Dt_Dts_h
  34. #define _Dt_Dts_h
  35.  
  36. #include <sys/stat.h>
  37.  
  38. #ifdef __cplusplus
  39. extern "C" {
  40. #endif
  41.  
  42. /*
  43.  * Constants
  44.  */
  45.  
  46. #define    DtDTS_DC_NAME            "DATA_CRITERIA"
  47. #define    DtDTS_NAME_PATTERN        "NAME_PATTERN"
  48. #define    DtDTS_PATH_PATTERN        "PATH_PATTERN"
  49. #define    DtDTS_CONTENT            "CONTENT"
  50. #define    DtDTS_MODE            "MODE"
  51. #define    DtDTS_LINK_PATH            "LINK_PATH"
  52. #define    DtDTS_LINK_NAME            "LINK_NAME"
  53. #define    DtDTS_DATA_ATTRIBUTES_NAME    "DATA_ATTRIBUTES_NAME"
  54.  
  55. #define    DtDTS_DT_RECURSIVE_LINK        "RECURSIVE_LINK"
  56. #define    DtDTS_DT_BROKEN_LINK        "BROKEN_LINK"
  57. #define    DtDTS_DT_UNKNOWN        "UNKNOWN"
  58.  
  59. #define    DtDTS_DA_IS_SYNTHETIC        "IS_SYNTHETIC"
  60. #define    DtDTS_DA_LABEL            "LABEL"
  61. #define    DtDTS_DA_NAME            "DATA_ATTRIBUTES"
  62. #define    DtDTS_DA_DESCRIPTION        "DESCRIPTION"
  63. #define    DtDTS_DA_DATA_HOST        "DATA_HOST"
  64. #define    DtDTS_DA_ICON            "ICON"
  65. #define    DtDTS_DA_INSTANCE_ICON        "INSTANCE_ICON"
  66. #define    DtDTS_DA_PROPERTIES        "PROPERTIES"
  67. #define    DtDTS_DA_ACTION_LIST        "ACTIONS"
  68. #define DtDTS_DA_NAME_TEMPLATE        "NAME_TEMPLATE"
  69. #define DtDTS_DA_MODE_TEMPLATE        "MODE_TEMPLATE"
  70. #define    DtDTS_DA_MOVE_TO_ACTION        "MOVE_TO_ACTION"
  71. #define    DtDTS_DA_COPY_TO_ACTION        "COPY_TO_ACTION"
  72. #define    DtDTS_DA_LINK_TO_ACTION        "LINK_TO_ACTION"
  73. #define    DtDTS_DA_IS_TEXT        "IS_TEXT"
  74. #define    DtDTS_DA_MEDIA            "MEDIA"
  75. #define    DtDTS_DA_MIME_TYPE        "MIME_TYPE"
  76. #define    DtDTS_DA_MIME_TO_MEDIA_FILTER    "MIME_TO_MEDIA_FILTER"
  77. #define    DtDTS_DA_MEDIA_TO_MIME_FILTER    "MEDIA_TO_MIME_FILTER"
  78. #define    DtDTS_DA_X400_TYPE        "X400_TYPE"
  79. #define    DtDTS_DA_X400_TO_MEDIA_FILTER    "X400_TO_MEDIA_FILTER"
  80. #define    DtDTS_DA_MEDIA_TO_X400_FILTER    "MEDIA_TO_X400_FILTER"
  81. #define    DtDTS_DA_IS_ACTION        "IS_ACTION"
  82. #define    DtDTS_DA_IS_EXECUTABLE        "IS_EXECUTABLE"
  83.  
  84. #define    DtDTS_DT_DIR    ".DtDirDataType"
  85.  
  86.  
  87. /*
  88.  * Types
  89.  */
  90.  
  91. typedef    struct    _DtDtsAttribute
  92. {
  93.     char    *name;
  94.     char    *value;
  95. } DtDtsAttribute;
  96.  
  97.  
  98. /*
  99.  * Functions
  100.  */
  101.  
  102. extern void DtDtsLoadDataTypes(void);
  103. extern void DtDtsRelease(void);
  104.  
  105. extern char *DtDtsDataToDataType(
  106.         const char        *filepath,
  107.         const void        *buffer,
  108.         const int        size,
  109.         const struct stat    *stat_buff,
  110.         const char        *link_name,
  111.         const struct stat    *link_stat_buff,
  112.         const char        *opt_name);
  113.  
  114. extern char *DtDtsFileToDataType(
  115.         const char        *filepath);
  116.  
  117. extern char *DtDtsFileToAttributeValue(
  118.         const char        *filepath,
  119.         const char        *attr);
  120.  
  121. extern DtDtsAttribute **DtDtsFileToAttributeList(
  122.         const char        *filepath);
  123.  
  124. extern char *DtDtsBufferToDataType(
  125.         const void        *buffer,
  126.         const int        size,
  127.         const char        *opt_name);
  128.  
  129. extern char *DtDtsBufferToAttributeValue(
  130.         const void        *buffer,
  131.         const int        size,
  132.         const char        *attr,
  133.         const char        *opt_name);
  134.  
  135. extern    DtDtsAttribute    **DtDtsBufferToAttributeList(
  136.         const void        *buffer,
  137.         const int        size,
  138.         const char        *opt_name);
  139.  
  140. extern char *DtDtsDataTypeToAttributeValue(
  141.         const char        *datatype,
  142.         const char        *attr,
  143.         const char        *opt_name);
  144.  
  145. extern    DtDtsAttribute    **DtDtsDataTypeToAttributeList(
  146.         const char        *datatype,
  147.         const char        *opt_name);
  148.  
  149. extern void DtDtsFreeDataTypeNames(
  150.         char            **namelist);
  151.  
  152. extern void DtDtsFreeAttributeList(
  153.         DtDtsAttribute        **attr_list);
  154.  
  155. extern void DtDtsFreeAttributeValue(
  156.         char            *attr_value);
  157.  
  158. extern void DtDtsFreeDataType(
  159.         char            *datatype);
  160.  
  161. extern char **DtDtsDataTypeNames(void);
  162.  
  163. extern char **DtDtsFindAttribute(
  164.         const char        *name,
  165.         const char        *value);
  166.  
  167. extern char *DtDtsSetDataType(
  168.         const char        *filepath,
  169.         const char        *datatype,
  170.         const int        override);
  171.  
  172. extern int DtDtsDataTypeIsAction(
  173.         const char        *datatype);
  174.  
  175. #ifdef __cplusplus
  176. }
  177. #endif
  178.  
  179. #endif  /* _Dt_Dts_h */
  180.